//
//  Config.m
//  TianjinBoHai
//
//  Created by 李莹 on 15/1/16.
//  Copyright (c) 2015年 Binky Lee. All rights reserved.
//

#import "Config.h"

/**
 * 一般分割线颜色
 */
NSString *dividerColor = @"F0F0F0";

/**
 * 字体颜色
 */
NSString *textColor = @"666666";

/**
 * 一般背景颜色
 */
NSString *bgColor = @"eeeeee";

/**
 *  文字按钮  白色
 */
NSString *whiteColor = @"ffffff";

/**
 *  主颜色
 */
NSString *mainColor = @"3a95ff";

/**
 *  导航栏颜色
 */
NSString * navColor = @"EC4350";

@implementation Config

UIColor* getColor(NSString * hexColor)
{
    unsigned int red, green, blue;
    NSRange range;
    range.length = 2;
    
    range.location = 0;
    [[NSScanner scannerWithString:[hexColor substringWithRange:range]] scanHexInt:&red];
    range.location = 2;
    [[NSScanner scannerWithString:[hexColor substringWithRange:range]] scanHexInt:&green];
    range.location = 4;
    [[NSScanner scannerWithString:[hexColor substringWithRange:range]] scanHexInt:&blue];
    
    return [UIColor colorWithRed:(float)(red/255.0f) green:(float)(green/255.0f) blue:(float)(blue/255.0f) alpha:1.0f];
}

@end

